//
//  ThemeManage.m
//  夜间模式9-27
//
//  Created by dllo on 15/9/27.
//  Copyright (c) 2015年 直到世界的尽头. All rights reserved.
//
#import "UIColor+Wonderful.h"
#import "ThemeManage.h"
static ThemeManage *manage;
@implementation ThemeManage

#pragma mark - 单例的初始化
+(ThemeManage *)shareThemeManage
{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        manage = [[ThemeManage alloc] init];
    });
    return manage;
}

#pragma mark 重写isNight的set方法
-(void)setIsNight:(BOOL)isNight
{
    _isNight = isNight;
    
    if (self.isNight) {
        self.bgColor = [UIColor grayColor];
        self.textColor = [UIColor whiteColor];
        self.color1 = [UIColor grayColor];
        self.color2 = [UIColor grayColor];
        self.color3 = [UIColor whiteColor];
        self.navBarColor = [UIColor whiteColor];
        self.textColorGray = [UIColor whiteColor];
    }
    else{
        self.bgColor = [UIColor clearColor];
        self.textColor = [UIColor blackColor];
        self.color1 = [UIColor redColor];
        self.color2 = [UIColor goldColor];
        self.color3 = [UIColor redColor];
        self.navBarColor = [UIColor goldColor];
        self.textColorGray = [UIColor grayColor];
    }
    
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        self.colorClear = [UIColor clearColor];
    });
}

@end
